<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <link rel="stylesheet" href="css/user/public.css">
    <link rel="stylesheet" href="css/user/index.css">
    <script language="javascript" type="text/javascript" src="js/user/jquery-1.8.3.min.js"></script>
    <script language="javascript" type="text/javascript" src="js/user/index.js"></script>
    <title>首页</title>
    <script>
        $(function(){
            /* 点击事件会在超链接跳转前发生 */
            $(".index_logo_box_right_xl a").click(function(){
                var link = $(this).attr('href');
                $('#iframepage').attr('src', link);
                var href = window.location.href;
                window.location.href = href.substr(0, href.indexOf('#')) + '#' + link;
                return false;
            });
        });
    </script>
</head>
<body>
<!--top-->
<div class="index_top_link">
    <div class="index_top_link_box">
        <p>专注做好投融资平台</p>
    </div>
</div>
<div class="index_logo">
    <div class="index_logo_box">
        <div class="index_logo_box_left">
            <a href="#"><img src="images/logo.png" class="index_logo_box_left_logo"></a>
            <img src="images/logo_title.png">
        </div>
        <div class="index_logo_box_right">
            <p class="index_logo_box_right_back"><a href="">返回领投首页</a><img src="images/line.png" class="index_logo_box_right_back_line"><span>欢迎您！</span></p>
            <div  class="index_right_menu">
                <a href="#" class="index_right_menu_name"><em>lily.liu</em><img src="images/top_icon.png" ></a>
                <div class="index_logo_box_right_xl">
                    <ul>
                        <li><a href="#">我的领投</a></li>
                        <li><a href="/index_list.html">个人中心</a></li>
                        <li><a href="/published_items.html">项目管理</a></li>
                        <li><a href="/my_assets.html">我的账户</a></li>
                    </ul>
                </div>
            </div>
            <p class="index_logo_box_right_quit"><img src="images/line.png" class="index_logo_box_right_back_line"><span>退出</span></p>
        </div>
    </div>
</div>
<!--top-->
<!--main-->
<div class="index_main">
    <div class="index_main_box">
        <!--left-->
        <div class="index_main_left">
            <ul>
                <p>个人中心</p>
                <li><a href="index_list.html" class="index_main_left_on" target="iframepage">总览</a></li>
                <li><a href="basic_infor.html" target="iframepage">基本资料</a></li>
                <li><a href="modify_avatar.html" target="iframepage">修改头像</a></li>
                <li><a href="invitation.html" target="iframepage">邀请</a></li>
            </ul>
            <ul>
                <p>项目管理</p>
                <li><a href="release_project.html" target="iframepage">发布项目</a></li>
                <li><a href="published_items.html" target="iframepage">已发布项目</a></li>
                <li><a href="focus_on_project.html" target="iframepage">我的关注</a></li>
            </ul>
            <ul>
                <p>我的账户</p>
                <li><a href="my_assets.html" target="iframepage">我的资产</a></li>
                <li><a href="contact_way.html" target="iframepage">联系方式</a></li>
            </ul>
        </div>
        <!--left-->
        <!--right-->
        <div class="index_main_right">
            <iframe src="index_list.html" id="iframepage" name="iframepage" marginwidth="0" marginheight="0" src="/Home/Activitylist" frameborder="0" width="100%" scrolling="no" height="100%"></iframe>
        </div>
        <!--right-->
    </div>
<div class="cleardiv"></div>
</div>
<!--main-->
<!--footer-->
<div class="index_footer">
    <div class="index_footer_box">
        <div class="index_footer_box_left">
            <ul class="index_footer_box_nav">
                <li><a href="#" target="_blank">关于我们</a></li>
                <li><a href="#" target="_blank">帮助中心</a></li>
                <li><a href="#" target="_blank">合作伙伴</a></li>
                <li><a href="#" target="_blank">新闻动态</a></li>
                <li><a href="#" target="_blank">服务条款</a></li>
                <li><a href="#" target="_blank">法律法规</a></li>
                <li><a href="#" target="_blank">风险揭示</a></li>
                <li><a href="" style="border:none;" target="_blank">隐私保护</a></li>
                <div class="cleardiv"></div>
            </ul>
            <ul class="index_footer_box_nav1">
                <li><a target="_blank">2015 领投 All rights reserved</a></li>
                <li><a target="_blank">杭州领投服务有限公司</a></li>
                <li><a style="border:none;">浙ICP备11455162号-6</a></li>
                <div class="cleardiv"></div>
            </ul>
        </div>

        <p class="index_wei"><img src="images/weixin.png" ></p>
    </div>
</div>
<script>
    $("#iframepage").load(function(){
        var mainheight = $(this).contents().find("body").height()+100;
        $(this).height(mainheight);
    });
    function getCookie(c_name)
		{
			if (document.cookie.length>0)
			  {
			  c_start=document.cookie.indexOf(c_name + "=")
			  if (c_start!=-1)
			    {
			    c_start=c_start + c_name.length+1
			    c_end=document.cookie.indexOf(";",c_start)
			    if (c_end==-1) c_end=document.cookie.length
			    return unescape(document.cookie.substring(c_start,c_end))
			    }
			  }
			return ""
		}
    //设置cookie
    function setCookie(cname, cvalue, exdays) {
        var d = new Date();
        d.setTime(d.getTime() + (exdays*24*60*60*1000));
        var expires = "expires="+d.toUTCString();
        document.cookie = cname + "=" + cvalue + "; " + expires;
    }
    function clearCookie(name) {
        setCookie(name, "", -1);
    }
    $(document).ready(function(){
    	console.log("cookie:" + getCookie("loginInfo"));
    	var loginInfo = JSON.parse(getCookie("loginInfo"));
    	loginInfo = JSON.parse(loginInfo);
        var userName = loginInfo.userName;
    	if(!userName) {
    		userName = "admin";
    	}
    	 $(".index_right_menu_name").html("<em>" + userName + "</em><img src=\"images/top_icon.png\" >");
        $(".index_logo_box_right_back").html("<a href='index.html?"+userName+"'>返回领投首页</a><img src='images/line.png' class='index_logo_box_right_back_line'><span>欢迎您！</span>");
        $(".index_logo_box_left").html("<a href='index.html?"+userName+"'><img src='images/logo.png' class='index_logo_box_left_logo'></a><img src='images/logo_title.png'>")
    });
$(".index_logo_box_right_quit").click(function(){
    clearCookie();
    window.location="login.html";
})
</script>
<!--footer-->

</body>
</html>